<template>
  <div class="page-wrapper">
    <Nuxt />
    <div class="qq-aside" :class="{'w-40': !show}">
      <div class="btn" @click="showContent">
        <img v-if="show" src="~assets/img/icon-up.png">
        <img v-else src="~assets/img/icon-down.png">
      </div>
      <div class="content" v-if="show">
        <div class="item flex-row-center">
          <img src="~assets/img/icon-qq.png">在线咨询
        </div>
        <div class="item flex-row-center">
          <img src="~assets/img/icon-qq.png">投诉建议
        </div>
        <div class="item flex-row-center">
          <img src="~assets/img/icon-qq.png">点击入群
        </div>
        <div class="qrcode flex-col-v-center">
          <img src="~assets/img/tmp/qrcode.png" />
          <div class="txt">扫一扫关注我们</div>
        </div>
      </div>
    </div>
    <div class="footer-box flex-center">
      Copyright © 2020 www.zlds.com  梓良代售 版权所有
    </div>
  </div>
</template>

<style lang="scss">
html {
  font-family: "PingFang SC","Helvetica Neue",Helvetica,"Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
  font-size: 16px;
  word-spacing: 1px;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
  background: rgb(245, 245, 245);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

.page-wrapper {
  background: rgb(245, 245, 245);
  position: relative;
}

.qq-aside {
  position: fixed;
  bottom: 100px;
  right: 0;
  width: 180px;
  height: 290px;
  z-index: 100;
  &.w-40 {
    width: 40px;
  }
  .btn {
    position: absolute;
    left: 0;
    width: 40px;
    height: 100%;
    img {
      width: 40px;
      height: 40px;
      cursor: pointer;
    }
  }
  .content {
    position: absolute;
    right: 0;
    left: 40px;
    top: 0;
    height: 100%;
    background: rgba(57, 54, 50, 0.7);
    box-shadow: 0 2px 10px 0 rgba(54,54,60,0.10);
    .qrcode {
      padding: 15px;
      img {
        width: 110px;
        height: 110px;
      }
      .txt {
        padding-top: 6px;
        font-size: 12px;
        color: #ffffff;
        line-height: 20px;
      }
    }
    .item {
      font-size: 12px;
      color: #ffffff;
      height: 44px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.5);
      cursor: pointer;
      img {
        width: 16px;
        height: 16px;
        margin-right: 2px;
      }
    }
  }
}

.footer-box {
  padding: 48px 0;
  font-size: 12px;
  color: #3A3D41;
  line-height: 17px;
}
</style>

<script>
import Core from '@/core/core'
export default {
  data() {
    return {
      show: false
    }
  },
  mounted() {
    let show = Core.Data.get("show-qq-side")
    this.show = !!show;
  },
  methods: {
    showContent() {
      this.show = !this.show
      Core.Data.set("show-qq-side", this.show)
    },
  }
}
</script>

